<!doctype html>
<html lang="en" class="fixed">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>学员信息</title>
    <link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
    <link rel="icon" type="image/png" sizes="192x192" href="favicon/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
    <link rel="stylesheet" type="text/css"
          href="<?php xcho(loadSource('/assets/plugins/bootstrap/css/bootstrap.min.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/plugins/animate.css/animate.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/plugins/font-awesome/css/font-awesome.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/plugins/fullcalendar/fullcalendar.min.css')) ?>">
    <link rel="stylesheet"
          href="<?php xcho(loadSource('/assets/plugins/data-table/media/css/dataTables.bootstrap.min.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/app/css/style.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/app/css/app.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/css/new_main.css')) ?>">
    
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        ul,li,ol,li{
            list-style: none;
        }
        .content-cont{
            /*width: 1200px;*/
            background: #fff;
            margin: 0 auto;
        }
        .content-cont .cont-title{
            padding: 10px 0 5px;
            border-bottom: 1px #ccc solid;
        }
        .content-cont .cont-title h2{
            font-size: 16px;
            padding-left: 20px;
            display: inline-block;
        }
        .content-cont .cont-title h2 button{
            padding: 6px 14px;
            background: rgba(226,175,8,.6);
            border: none;
            box-shadow: 0 0 5px #ccc;
            border-radius: 5px;
            font-size: 10px;
            color: #fff;
            margin-left: 80px;
        }
        .content-cont .cont-title ol{
            padding: 10px 20px;
            display: inline-block;
        }
        .content-cont .cont-title ol li{
            display: inline-block;
            margin: 0 5px;
        }
        .content-cont .cont-title ol li button{
            padding: 4px 10px;
            border: none;
            border-radius: 5px;
            color:#fff;
            font-size: 12px;
            background: #1ab394;
        }
        .content-cont .cont-title ul{
            float: right;
            padding: 10px 20px;
        }
        .content-cont .cont-title ul li{
            display: inline-block;
            margin: 0 5px;
        }
        .content-cont .cont-title ul li button{
            padding: 4px 10px;
            border: none;
            border-radius: 5px;
            color:#fff;
            font-size: 12px;
            background: #1ab394;
        }
        .content-cont .cont-title ul li:nth-of-type(3) button{
            background: rgba(215,82,52,.6);
        }
        .content-cont .cont{
            padding: 20px;
        }
        .content-cont .cont ul.list{
            display: inline-block;
            border: 1px #eee solid;
            float: left;
        }
        .content-cont .cont ul.list li{
            line-height: 30px;
            font-size: 12px;
            padding: 0 16px;
            border-bottom: 1px #eee solid;
            cursor: pointer;
        }
        .content-cont .cont ul.list li.active{
            background: #E7F4FD;
            color:#3F93EC;
        }
        /*.content-cont .cont ul.list li:nth-of-type(3){*/
            /*border-bottom: none;*/
        /*}*/
        .content-cont .cont .cont-tab{
            display: inline-block;
            margin-left: 20px;
            width: 80%;
        }
        .content-cont .cont .cont-tab>div{
            /*display: none;*/
            width: 100%;
        }
        /*---------------baseMessage------------------*/
        .content-cont .cont .cont-tab>div.baseMessage{
            display: inline-block;
        }
        .content-cont .cont .cont-tab .baseMessage .basemess h3{
            font-size: 18px;
        }
        .content-cont .cont .cont-tab .baseMessage .basemess table{
            width: 100%;
        }
        .content-cont .cont .cont-tab .baseMessage .basemess table tr{
            line-height: 30px;
            font-size: 10px;
            color: #333;
        }
        .content-cont .cont .cont-tab .baseMessage .basemess table tr td{
            width: 33%;
        }

        /*-----------------follow-record--------------------*/
        .content-cont .cont .cont-tab .follow-record .basemess h3{
            font-size: 18px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess table tr td span{
            margin-left: 40px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record{
            padding: 20px;
            border: 1px #ccc solid;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record select{
            width: 60px;
            border: 1px #ccc solid;
            border-radius: 5px;
            height: 24px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record input{
            width: 120px;
            border: 1px #ccc solid;
            border-radius: 5px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record select:nth-of-type(1){
            width: 160px;
            border: 1px #ccc solid;
            border-radius: 5px;
            height: 24px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record span:nth-of-type(2){
            margin-left: 30px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record div{
            margin-top: 10px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record div p{
            float: left;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record div textarea{
            resize: none;
            border: 1px #ccc solid;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record button{
            padding: 4px 14px;
            border: none;
            border-radius: 5px;
            background: #1ab394;
            color:#fff;
            font-size: 12px;
            margin-left: 64px;
        }
        .content-cont .cont .cont-tab .follow-record .top_pages{
            padding: 3px 15px;
            height: 30px;
            margin-top: 8px;
            font-size: 0;
        }
        .content-cont .cont .cont-tab .follow-record .top_pages p{
            display: inline-block;
            font-size: 12px;
        }
        .content-cont .cont .cont-tab .follow-record .top_pages ul{
            font-size: 0;
            display: inline-block;
            float: right;
        }
        .content-cont .cont .cont-tab .follow-record .top_pages ul li:nth-of-type(1){
            width: 120px;
            border:none;
            background: none;
        }
        .content-cont .cont .cont-tab .follow-record .top_pages ul li:nth-of-type(1):hover{
            background: none;
            color:#999;
        }
        .content-cont .cont .cont-tab .follow-record .top_pages ul li{
            display: inline-block;
            font-size: 12px;
            width: 24px;
            height: 24px;
            background: #fff;
            margin-left: 10px;
            line-height: 24px;
            text-align: center;
            border: 1px #ccc solid;
            border-radius: 6px;
            cursor: pointer;
            color:#999;
        }
        .content-cont .cont .cont-tab .follow-record .top_pages ul li:last-child{
            width: 120px;
            border:none;
            background: none;
        }
        .content-cont .cont .cont-tab .follow-record .top_pages ul li:last-child input{
            width: 50px;
            margin: 0 10px;
            border-radius: 6px;
            border: none;
            border:1px #ccc solid;
            outline: none;
        }
        .content-cont .cont .cont-tab .follow-record .top_pages ul li:last-child:hover{
            background: none;
            color:#999;
        }
        .content-cont .cont .cont-tab .follow-record .top_pages ul li:hover{
            background: #108EE9;
            color:#fff;
        }
        .content-cont .cont .cont-tab .follow-record .table{
            width: 100%;
            margin-top: 10px;
        }
        .content-cont .cont .cont-tab .follow-record .table table{
            width: 100%;
        }
        .content-cont .cont .cont-tab .follow-record .table table thead tr th{
            padding: 10px;
            background: #1ab394;
            color:#fff;
            text-align: center;
        }
        .content-cont .cont .cont-tab .follow-record .table table thead tr th:nth-of-type(1) span{
            display: inline-block;
            width: 12px;
            height: 12px;
            border:1px #888 solid;
            background: #fff;
            margin-right: 20px;
            position: relative;
            cursor: pointer;
        }
        .content-cont .cont .cont-tab .follow-record .table table thead tr th:nth-of-type(1) span b{
            position: absolute;
            left: 28%;
            top:-60%;
        }
        .content-cont .cont .cont-tab .follow-record .table table tbody tr{
            border-bottom: 1px #ccc solid;
        }
        .content-cont .cont .cont-tab .follow-record .table table tbody tr:nth-of-type(even){
            background: rgba(238,238,238,.5);
        }
        .content-cont .cont .cont-tab .follow-record .table table tbody tr td{
            padding: 8px;
            border-bottom: 1px #eee solid;
            text-align: center;
        }
        .content-cont .cont .cont-tab .follow-record .table table tbody tr td:nth-of-type(2){
            color:#108EE9;
        }
        .content-cont .cont .cont-tab .follow-record .table table tbody tr td:last-child span{
            margin: 0 5px;
            color:#777;
            position: relative;
            cursor: pointer;
        }
        .content-cont .cont .cont-tab .follow-record .table table tbody tr td:last-child span b{
            width: 40px;
            line-height: 24px;
            background: #fff;
            position: absolute;
            bottom: -25px;
            left: -15px;
            font-weight: normal;
            font-size: 10px;
            color:#000;
            border: 1px #ccc solid;
            border-radius: 5px;
            display: none;
        }
        .content-cont .cont .cont-tab .follow-record .bottom_pages{
            padding: 3px 15px;
            height: 30px;
            margin-top: 8px;
            background: #fff;
            font-size: 0;
        }
        /*----------------------he-course-----------------*/
        .content-cont .cont .cont-tab>div.he-course{
            width: 100%;
        }
        .content-cont .cont .cont-tab>div.he-course ul{
            border-bottom: 1px #eee solid;
        }
        .content-cont .cont .cont-tab>div.he-course ul li{
            display: inline-block;
            width: 80px;
            text-align: center;
            cursor: pointer;
        }
        .content-cont .cont .cont-tab>div.he-course ul li.active{
            border-bottom: 2px #1ab394 solid;
            color:#1ab394;
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div{
            display: none;
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div:nth-of-type(1){
            display: block;
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div table{
            width: 100%;
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div table thead tr{
            background: #1ab394;
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div table thead tr th{
            padding: 10px 0;
            color:#fff;
            text-align: center;
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div table tbody tr{

        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div table tbody tr:nth-of-type(even){
            background: rgba(238,238,238,.5);
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div table tbody tr td{
            padding: 6px 0;
            text-align: center;
            color:#333;
        }
        /*---------------schedule------------------*/
        .content-cont .cont .cont-tab>div.schedule button{
            padding: 4px 14px;
            border: none;
            border-radius: 5px;
            background: #1ab394;
            color:#fff;
            font-size: 12px;
            margin-left: 10px;
        }
        .content-cont .cont .cont-tab>div.schedule h4{
            display: inline-block;
            margin-left: 200px;
        }
        .content-cont .cont .cont-tab>div.schedule table{
            width: 100%;
        }
        .content-cont .cont .cont-tab>div.schedule table thead tr{
            border-bottom: 3px #eee solid;

        }
        .content-cont .cont .cont-tab>div.schedule table thead tr th{
            text-align: center;
            padding: 10px 0;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr{
            border-bottom: 3px #eee solid;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr span{
            color:#333;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr span b{
            padding: 4px 8px;
            font-weight: normal;
            font-size: 12px;
            color: #fff;
            background: #1ab394;
            border-radius: 5px;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr ul{
            margin-top: 6px;
            padding: 4px 10px;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr td:nth-of-type(even) ul:nth-of-type(odd){
            background: rgba(238,238,238,.5);
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr td:nth-of-type(odd) ul:nth-of-type(even){
            background: rgba(238,238,238,.5);
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr td{
            vertical-align: initial;
            padding: 10px 0;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr td ul li{
            line-height: 24px;
            font-size: 12px;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr td ul li:nth-of-type(3){
            color:#108EE9;
        }
        /*---------------reviseLog------------------*/
        .content-cont .cont .cont-tab>div.reviseLog table{
            width: 100%;
        }
        .content-cont .cont .cont-tab>div.reviseLog table thead tr{
            background: #1ab394;
        }
        .content-cont .cont .cont-tab>div.reviseLog table thead tr th{
            padding: 10px 0;
            color:#fff;
            text-align: center;
        }
        .content-cont .cont .cont-tab>div.reviseLog table tbody tr{

        }
        .content-cont .cont .cont-tab>div.reviseLog table tbody tr:nth-of-type(even){
            background: rgba(238,238,238,.5);
        }
        .content-cont .cont .cont-tab>div.reviseLog table tbody tr td{
            padding: 6px 0;
            text-align: center;
            color:#333;
        }
        /*------------------charge-record----------------*/
        .content-cont .cont .cont-tab .charge-record table tbody tr td:last-child span{
            margin: 0 5px;
            color:#777;
            position: relative;
            cursor: pointer;
        }
        .content-cont .cont .cont-tab .charge-record table tbody tr td:last-child span b{
            width: 40px;
            line-height: 24px;
            background: #fff;
            position: absolute;
            bottom: -25px;
            left: -15px;
            font-weight: normal;
            font-size: 10px;
            color:#000;
            border: 1px #ccc solid;
            border-radius: 5px;
            display: none;
        }
    </style>
</head>

<body><?php include_once TPL_PATH . 'public/nav.phtml'; ?>
<div class="wrap">
    <div class="page-body" style="padding: 0">
        <div class="content" style="margin: 0;background: #F4F4F4">
            <div class="content-cont">
                <div class="cont-title">
                    <h2> <button><a href="<?php xcho(url('/student/formal/index')) ?>">返回列表</a></button></h2>
                    <ol>
                        <?php if(!empty($nextId)) { ?>
                            <!--                            <li><button><a href="--><?php // xcho(url('/student/student/studentinfo')) ?><!--?student_id=--><?php //xcho($nextId) ?><!--">下一条</a></button></li>-->
                            <li><button><a href="<?php xcho(url('/student/formal/studentinfo')) ?>?student_id=<?php xcho($nextId) ?>" >下一条</a></button></li>
                        <?php } ?>
                        <!--                        <li><button><a href="--><?php //xcho(url('/course/Reservation/add')) ?><!--?id=--><?php //xcho($student_id) ?><!--">创建试听</a></button></li>-->
                        <li><button><a href="<?php xcho(url('/course/Reservation/add')) ?>?id=<?php xcho($student_id) ?>" >创建试听</a></button></li>
                        <?php if(!empty($aStudent['gw_id'])) { ?>
                            <li><button><a href="<?php xcho($gw_by_course) ?>?str=<?php xcho($str) ?>&key=<?php xcho($key) ?>" target="_blank">官网购课</a></button></li>
                        <?php } ?>
                        <?php if(!empty($aActions['handCourse'])) { ?>
                            <!--                            <li><button><a href="--><?php //xcho(url('/finance/order/handBuyCourse')) ?><!--?student_id=--><?php //xcho($student_id) ?><!--">手动购课</a></button></li>-->
                            <li><button><a href="<?php xcho(url('/finance/order/handBuyCourse')) ?>?student_id=<?php xcho($student_id) ?>" target="_blank">手动购课</a></button></li>
                        <?php } ?>

                        <!--                        <li><button><a href="--><?php //xcho(url('/student/student/info')) ?><!--?student_id=--><?php //xcho($student_id) ?><!--">添加跟踪记录</a></button></li>-->
                        <li><button><a href="<?php xcho(url('/student/formal/info')) ?>?student_id=<?php xcho($student_id) ?>">添加跟踪记录</a></button></li>
                    </ol>
                    <ul>
                        <?php if(!empty($aActions['edit'])) { ?>
                            <!--                            <li><button><a href="--><?php //xcho(url('/student/student/editstudent')) ?><!--?student_id=--><?php //xcho($student_id) ?><!--">编辑</a></button></li>-->
                            <li><button><a href="<?php xcho(url('/student/formal/editstudent')) ?>?student_id=<?php xcho($student_id) ?>">编辑</a></button></li>
                        <?php } ?>
                        <?php if(!empty($aActions['del'])) { ?>
                            <li><button><a class="delete" data-cn_id="<?php xcho($student_id) ?>">删除</a></button></li>
                        <?php } ?>
                    </ul>
                </div>
                <div class="cont">
                    <ul class="list">
                        <li><a href="<?php xcho($studentinfo) ?>?student_id=<?php xcho($student_id) ?>" >基础信息</a></li>
                        <li><a href="<?php xcho($fol_list) ?>?student_id=<?php xcho($student_id) ?>" >跟踪记录（<?php xcho($count_follow) ?>）</a></li>
                        <li><a href="<?php xcho($courseinfo) ?>?student_id=<?php xcho($student_id) ?>" >TA的课程（<?php xcho($totalCourse) ?>）</a></li>
                        <li><a href="<?php xcho($fol_list) ?>?student_id=<?php xcho($student_id) ?>" >课程表</a></li>
                        <li><a href="<?php xcho(url('/student/student/charges')) ?>?student_id=<?php xcho($student_id) ?>" >收费记录</a>（<?php xcho($count_chargeList) ?>）</li>
                        <li><a href="<?php xcho($loglist) ?>?student_id=<?php xcho($student_id) ?>" >修改日志（<?php xcho($editLog) ?>）</a></li>
                    </ul>
                    <div class="cont-tab">

                        <div class="keB">
                            <div class="student-title">
                                <h2>课程表</h2>
                            </div>
                            <div id='calendar'></div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<input type="hidden" name="del" value="<?php xcho($del) ?>"/>
<input type="hidden" name="search_url" value="<?php xcho($personList) ?>">
<input type="hidden" name="user_id" value="<?php xcho($student_id) ?>">
<input type="hidden" name="user_type" value="student">
<script src="<?php xcho(loadSource('/assets/plugins/fullcalendar/lib/moment.min.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/jquery/jquery.min.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/bootstrap/js/bootstrap.min.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/fullcalendar/fullcalendar.min.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/data-table/media/js/jquery.dataTables.min.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/data-table/media/js/dataTables.bootstrap.min.js')) ?>"></script>
<script
        src="<?php xcho(loadSource('/assets/plugins/data-table/extensions/Responsive/js/dataTables.responsive.min.js')) ?>"></script>
<script
        src="<?php xcho(loadSource('/assets/plugins/data-table/extensions/Responsive/js/responsive.bootstrap.min.js')) ?>"></script>
<script>
    $(".cont>ul.list>li").click(function(){
        var ind=$(this).index();
        $(this).addClass("active").siblings("li").removeClass("active");
        $(".cont>.cont-tab>div").eq(ind).slideDown(200).siblings("div").slideUp(200);
    });
    $("table tr>td>span").hover(function(){
        $(this).find("b").show();
    },function(){
        $(this).find("b").hide();
    });
    $(".he-course>ul>li").click(function(){
        var ind=$(this).index();
        $(this).addClass("active").siblings("li").removeClass("active");
        $(".heCourse-cont>div").eq(ind).slideDown(200).siblings("div").slideUp(200);
    });

    $(document).ready(function() {
        $('#calendar').fullCalendar({
            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,basicWeek,basicDay'
            },
            defaultDate: '2017-10-21',
            navLinks: true, // can click day/week names to navigate views
            editable: true,
            defaultView: 'basicWeek',
            eventLimit: true, // allow "more" link when too many events
            events: function(start, end, timezone, callback) {
                var ajUrl = $("input[name='search_url']").val();
                var date = this.getDate().format('YYYY-MM-DD');
                //console.log(date);
                $.ajax({
                    url: ajUrl,
                    dataType: 'json',
                    cache:false,
                    data: {
                        // our hypothetical feed requires UNIX timestamps
                        date_time: date,
                        user_id: $("input[name='user_id']").val(),
                        user_type:$("input[name='user_type']").val()
                    },
                    success: function(doc) {
                        //console.log(doc);
                        //console.log(doc.sTitleName);
                        $(".student-title>h2").html(doc.sTitleName);
                        var events = [];
                        $.each(doc.aCourseLessons,function(i,val){
                            // console.log(val.data_type);
                            if(val.data_type=="course"){
                                events.push({
                                    id:val.id,
                                    title: val.user_name+'\r\n'+val.times+'('+val.arrange_status+')'+'\r\n'+val.cname,
                                    allDay:true,
                                    start: val.start_time,// will be parsed
                                    end:val.end_time,
                                    url:val.course_url,
                                });
                            }else if(val.data_type == "schedule"){
                                events.push({
                                    title: val.topic+'\r\n'+val.times,
                                    allDay:true,
                                    start: val.start_time,// will be parsed
                                    end:val.end_time,
                                    url:val.syllabus_url,
                                });
                            }
                        });
                        callback(events);
                        //新打开页面
                        $(".fc-event-container>a.fc-day-grid-event").attr("target","_blank");
                        $(".fc-more").click(function(){
                            $(".fc-body.fc-widget-content>.fc-event-container>a.fc-day-grid-event").attr("target","_blank");
                        })

                    }
                });
            },
        });
    });
    $(function () {
        $(".delete").on("click", function () {
            if (confirm("确定删除本条数据吗？")) {
                var cn_id = $(this).attr("data-cn_id");
                $.ajax({
                    url: $("input[name='del']").val(),
                    data: {
                        ids: cn_id
                    },
                    type: 'post',
                    dataType: 'json',
                    success: function (data) {
                        console.log(data)
                        if (data.success == 1) {
                            layer.alert("删除成功!", {
                                skin: 'layui-layer-molv'
                            }, function () {
                                window.location.href = "/student/formal/index";
                                //window.parent.updateParentTab({href:'/student/formal/index',title:'学员列表'})
                            })
                        } else {
                            layer.alert(data.msg, {
                                skin: 'layui-layer-molv'
                            }, function () {
//                                window.parent.updateParentTab({href:'/student/student/index',title:'学员列表'})
                            })
                        }
                    },
                    complete: function () {
                    },
                    error: function () {

                    }
                });
            }
        })
    })

</script>
<?php include_once TPL_PATH . 'public/foot_script.phtml'; ?>
<button id="top" style="height: 50px;width: 50px;"></button></body>

</html>
